﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Zzw
{
    public static class IntHelper
    {
        /// <summary>
        /// 是否为空值
        /// </summary>
        /// <param name="color"></param>
        /// <returns></returns>
        public static bool IsNull(this int? value)
        {
            return value == null;
        }

        /// <summary>
        /// 是否不为空值
        /// </summary>
        /// <param name="color"></param>
        /// <returns></returns>
        public static bool IsNoNull(this int? value)
        {
            return !value.IsNull();
        }

        /// <summary>
        /// 是否为空值或者为零
        /// </summary>
        /// <param name="color"></param>
        /// <returns></returns>
        public static bool IsNullOrZero(this int? value)
        {
            return value == null || value == 0;
        }

        /// <summary>
        /// 是否不为空值或者为零
        /// </summary>
        /// <param name="color"></param>
        /// <returns></returns>
        public static bool IsNoNullOrZero(this int? value)
        {
            return !value.IsNullOrZero();
        }
    }
}